package routers

import (
	"chat/app/controllers"

	"github.com/astaxie/beego"
)

func init() {
	//restful 路由
	beego.Router("/", &controllers.MainController{})
	beego.Router("/chat", &controllers.ChatController{})
	// beego.Router("/chat/ws", &controllers.ServerController{}, "get:WS")
	beego.Router("/chat/ws", &controllers.Server2Controller{}, "get:WS")

	beego.Router("/test", &controllers.MainController{}, "get:Test")
	beego.Router("/chat/history", &controllers.ChatController{}, "get:History")
	beego.Router("/chat/room", &controllers.ChatController{}, "get:Room")
	beego.Router("/chat/delete", &controllers.ChatController{}, "get:Delete")

	beego.Router("/chat/buyer/history", &controllers.ChatController{}, "get:GetHistoryByBuyer")
	beego.Router("/chat/shoper/history", &controllers.ChatController{}, "get:GetHistoryByShoper")

}
